import time


def decorator(fn):
    def inner(*args, **kwargs):
        start = time.time()
        result = fn(*args, **kwargs)
        end = time.time()
        print(f'程序运行的时间:{end - start}')
        return result

    return inner


@decorator
def fn1(info):
    for i in range(info):
        print(i)


if __name__ == '__main__':
    fn1(10000000)
